home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ls_nt14.zip / LS.MAN < prev    next >
Text File  |  1995-04-21  |  7KB  |  161 lines

  1. LS(1)                   USER COMMANDS                     LS(1)
  2.  
  3. NAME
  4.      ls - list the contents of a directory.               [Version 1.4]
  5.  
  6. SYNOPSIS
  7.      ls [-aAcCdDFgGhIlLRrtuz1] file1 file2 ...
  8.  
  9. DESCRIPTION
  10.      ls is a command similar to DIR, but gives additional information
  11.      about files and directories such as owner, group and permissions
  12.      associated with each file and directory.
  13.  
  14.      The -l option shows information in long format. Output is divided
  15.      into several fields: the permissions field, the file's owner, the
  16.      groups field (showing all other users and groups who have been
  17.      granted specific rights to the file/directory), the file's size,
  18.      the modification date and the name:
  19.  
  20.     -rwxdr-x----- tomas      Users      43008 Aug 02 17:43 ls.exe
  21.     _____________ _____      _____      _____ ____________ ______
  22.     permissions   owner      group      size  mod.date     name
  23.  
  24.     
  25.      In addition, it is possible to add two more fields: the attribute field
  26.      (-z option) and DOS short file name (-D option).
  27.  
  28.  
  29.   Permissions Field
  30.      The permissions field, which is printed with the -l option on NTFS
  31.      file-systems, should be interpreted as follows:
  32.  
  33.      The first character shows the file type:
  34.           - = entry is a plain file
  35.           d = entry is a directory
  36.       t = entry is a temporary file
  37.           s = entry is a system file
  38.           a = entry is an atomic-write file
  39.           x = entry is an xaction write file
  40.  
  41.      The next 12 characters should be interpreted as three sets of four(!)
  42.      characters each. The first set refers to the owner's permissions; 
  43.      the next set shows access rights explicitly granted to other users
  44.      or groups; the last set refers to permissions for everyone else.
  45.      Within each set, the 4 fields indicate permission to read; to write;
  46.      to execute the file as a program; and to delete it (rwxd).
  47.      
  48.      It felt necessary to extend the Unix "ls" output format slightly since
  49.      NT interprets access-rights differently, i.e. an explicit delete right
  50.      can be assigned a file. (Upon request, I can add an option not to show
  51.      this entry.)
  52.      
  53.      The four letter positions in each set should be interpreted as follows.
  54.      In general, anything but the four lower-case letters "rwxd" indicates
  55.      that some kind of limitation applies:
  56.  
  57.     -------
  58.     1 | r  file is readable/directory is listable
  59.     -------
  60.       | w  write allowed, no restrictions
  61.       | W  write allowed but not append on files/directory allows file
  62.       |     creation only (no subdirs)
  63.     2 | a  only append allowed/directory allows subdir creation only
  64.       | *  the file is not writable, but ownership or protection
  65.       |      can be changed (this should be seen as a warning)
  66.       | =  the file is writable according to the access lists, but the
  67.       |     read-only attribute prevents writing (see the ATTRIB command)
  68.     -------
  69.     3 | x  file is executable/directory is traversable
  70.     -------
  71.       | d  delete is granted for this file or directory as well as for
  72.     4 |      all subdirectories
  73.       | D  delete is granted but not for subdirectories
  74.       | c  delete is only granted for subdirectories
  75.     -------
  76.  
  77.        The following two letters may also appear:
  78.       -  the indicated permission is not granted
  79.       ?  the indicated permission is not known by ls (only occurs in 
  80.            some rare cases when negative access rights are present)
  81.  
  82.  
  83.   Attribute Field
  84.      The attribute field replaces the permissions field on non NTFS file
  85.      systems. (It is also printed on NTFS file systems when -z option is
  86.      specified.) It contains 7 fields/characters:
  87.  
  88.       d = entry is a directory
  89.       s = entry is a system file
  90.       r = entry is read-only (see the ATTRIB command)
  91.       h = entry is hidden (ls needs -a option to show these files)
  92.       a = entry has the archive bit set
  93.       T = entry is a temporary file
  94.       A or X = entry is an atomic write (A) or xaction write (X) file
  95.  
  96.  
  97.   Owner and group fields
  98.       The owner field shows the owner of the file. The group field shows
  99.       *all* users and groups who are explicitly granted permission to do
  100.       something with the file or directory. Note that this interpretation
  101.       differs from the POSIX interpretation (POSIX groups are ignored by NT).
  102.       For example, if user A has permission to read a file (r), and user
  103.       B has permission to write (w), the group permission field will show
  104.       "rw--" and the group field shows "A,B".
  105.       
  106.       Thus, group permissions should be interpreted as a super-set of all
  107.       access rights EXPLICITLY given to other users on the system. Note that
  108.       all other users' rights are shown in the third set of the permissions
  109.       field. Also note that Administrator's and System's rights are not
  110.       included anywhere, i.e. they may have full access to all files even
  111.       if ls doesn't tell you!
  112.  
  113. OPTIONS
  114.      The following command-line options can be given to ls. ls will also
  115.      recognize these options if they are present in the environment variable
  116.      LSFLAGS which is useful when customizing output. 
  117.  
  118.      -a   List all entries; in the absence of this option,
  119.            hidden entries and . and .. do not show up
  120.      -A   Same as -a, except don't show  `.' and `..'
  121.      -c   Show creation time instead of last modification time
  122.      -C   Force multi-column output, with entries sorted down the
  123.            columns;  this is the default when output is to a terminal.
  124.      -1   Force one column output; this is the default when output is not
  125.        to a terminal.
  126.      -d   If argument is a directory, list only its name (not its contents);
  127.        often  used  with -l to get the status of a directory.
  128.      -D   Show MS-DOS short filenames (8+3 characters)
  129.      -F   Mark directories with a trailing slash /
  130.      -g   Show group ownership together with -l. See above for explanation.
  131.      -G   Same as -g, except that when group field becomes too long, only the
  132.        number of entries is shown, e.g. <10>. This makes the output
  133.        readable when many entries are present.
  134.      -h   Print version number and usage information
  135.      -I   Ignore case when sorting
  136.      -l   List in long format (required for many other options)
  137.      -L   Show names in lower case (non NTFS file-systems only)
  138.      -r   Reverse the order of sort to get reverse alphabetic or oldest first
  139.      -R   Recursively list subdirectories encountered
  140.      -t   Sort by time modified (latest first) instead of by name
  141.      -u   Show time for last access instead of last modification time
  142.      -z   Show DOS attributes
  143.  
  144.  
  145. BUGS
  146.      The ? output for owner protection should be removed. This involves
  147.      some work to check owner's group membership.
  148.  
  149.      The output window is assumed to be 80 columns wide.
  150.  
  151. COPYRIGHT
  152.      This program can be freely distributed and used as long as it is
  153.      not sold or made part of any commercial product. No responsibility
  154.      is taken for the program, for its output, correctness etc. Use it
  155.      on your own risk.
  156.  
  157. AUTHOR
  158.      Please send comments, suggestions and bug reports to:
  159.     Tomas Olovsson  [olovsson@ce.chalmers.se]
  160.  
  161.